package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.wemwdia.dto.AdSensitive;
import com.zhentao.model.wemwdia.dto.SensitiveDto;
import com.zhentao.service.SensitiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/sensitive")
public class SensitiveController {
    @Autowired
    private SensitiveService service;
    @PostMapping("list")
    public ResponseResult list(@RequestBody SensitiveDto dto){
        return service.list(dto);
    }

    @DeleteMapping("/del/{id}")
    public ResponseResult del(@PathVariable("id") Integer id){
        return service.del(id);
    }

    @PostMapping("save")
    public ResponseResult sava(@RequestBody AdSensitive adSensitive){
        return service.save(adSensitive);
    }
    @PostMapping("update")
    public ResponseResult update(@RequestBody AdSensitive adSensitive){
        return service.update(adSensitive);
    }

}
